#pragma once
#include "DVertexBuffer.h"
#include "../DVector3.h"

namespace DoolakhTM
{
	namespace Ode
	{
		void DVertexBuffer::CollectManagedMemory()
		{			
		}

		void DVertexBuffer::SetData(array<float>^ data,int startIndex,int lenght)
		{
			Marshal::Copy(data,startIndex,UnmanagedPointer,lenght);
		}		
		void DVertexBuffer::SetData(array<float>^ data)
		{
			SetData(data,0,data->Length);
		}

		void DVertexBuffer::SetVertex(int vertexIndex,dReal x,dReal y,dReal)
		{
			dReal* p = _This + vertexIndex * 3;
			p[0] = x;
			p[1] = y;
			p[2] = z;
		}
		void DVertexBuffer::SetVertex(int vertexIndex,DVector3^ vertex)
		{
		}

		DVector3^ DVertexBuffer::GetReferenceVertex(int vertexIndex)
		{
			return nullptr;
		}

	}
}